package lk;

public class Employee implements Comparable<Employee>{
	String employeeNo;
	int currentServicePeriod;
	int totalServicePeriod;
	int currentLocationServicePeriod;
	String request1;
	String request2;
	String request3;
	String currentLocation;
	String oldAssignment;	
	int assignedLocation =9;
	
	public int getAssignedLocation() {
		return assignedLocation;
	}
	public void setAssignedLocation(int assignedLocation) {
		this.assignedLocation = assignedLocation;
	}
	public String getCurrentLocation() {
		return currentLocation;
	}
	public void setCurrentLocation(String currentLocation) {
		this.currentLocation = currentLocation;
	}
	public String getEmployeeNo() {
		return employeeNo;
	}
	public void setEmployeeNo(String employeeNo) {
		this.employeeNo = employeeNo;
	}
	public int getCurrentServicePeriod() {
		return currentServicePeriod;
	}
	public void setCurrentServicePeriod(int currentServicePeriod) {
		this.currentServicePeriod = currentServicePeriod;
	}
	public int getTotalServicePeriod() {
		return totalServicePeriod;
	}
	public void setTotalServicePeriod(int totalServicePeriod) {
		this.totalServicePeriod = totalServicePeriod;
	}
	public int getCurrentLocationServicePeriod() {
		return currentLocationServicePeriod;
	}
	public void setCurrentLocationServicePeriod(int currentLocationServicePeriod) {
		this.currentLocationServicePeriod = currentLocationServicePeriod;
	}
	public String getRequest1() {
		return request1;
	}
	public void setRequest1(String reuest1) {
		this.request1 = reuest1;
	}
	public String getRequest2() {
		return request2;
	}
	public void setRequest2(String reuest2) {
		this.request2 = reuest2;
	}
	public String getRequest3() {
		return request3;
	}
	public void setRequest3(String reuest3) {
		this.request3 = reuest3;
	}	
	public String getOldAssignment() {
		return oldAssignment;
	}
	public void setOldAssignment(String oldAssignment) {
		this.oldAssignment = oldAssignment;
	}
	
	public Employee(String employeeNo, int currentServicePeriod,
			int totalServicePeriod, int currentLocationServicePeriod,
			String request1, String request2, String request3, String currentLocation) {
		super();
		this.employeeNo = employeeNo;
		this.currentServicePeriod = currentServicePeriod;
		this.totalServicePeriod = totalServicePeriod;
		this.currentLocationServicePeriod = currentLocationServicePeriod;
		this.request1 = request1;
		this.request2 = request2;
		this.request3 = request3;
		this.currentLocation = currentLocation;
	}
	
	public Employee(String employeeNo, int currentServicePeriod,
			int totalServicePeriod, int currentLocationServicePeriod,
			String request1, String request2, String request3, String currentLocation,String oldAssignment) {
		super();
		this.employeeNo = employeeNo;
		this.currentServicePeriod = currentServicePeriod;
		this.totalServicePeriod = totalServicePeriod;
		this.currentLocationServicePeriod = currentLocationServicePeriod;
		this.request1 = request1;
		this.request2 = request2;
		this.request3 = request3;
		this.currentLocation = currentLocation;
		this.oldAssignment = oldAssignment;
	}
	
	@Override
	public int compareTo(Employee o) {
		if(this.totalServicePeriod < o.totalServicePeriod){
			return 1;
		}else if(this.totalServicePeriod == o.totalServicePeriod){
			if(this.currentServicePeriod < o.currentServicePeriod){
				return 1;
			}else{
				return 0;
			}
		}
		return 0;
	}
	
	
	
	
	
}
